<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>设置样式</title>
</head>

<body>
    <div>设置样式</div>
    <hr />
    <div id="demoReact"></div>
</body>
<script src="../../node_modules/babel-standalone/babel.min.js"></script>
<script src="../../node_modules/react/umd/react.development.js"></script>
<script src="../../node_modules/react-dom/umd/react-dom.development.js"></script>
<script type="text/babel">

    let myStyle = { color: "red", "backgroundColor": "#00FFFF" };


    let myDom = (
        <p style={myStyle}>设置样式，需要注意的是background-color推荐使用backgroundColor</p>
    );
    let root = ReactDOM.createRoot(document.getElementById("demoReact"));
    root.render(myDom);
</script>

</html>